This describes the following two Standard MIDI Files:

	stkans1.mid  -  "Stock Answer #1"
	stkans2.mid  -  "Stock Answer #2"

By Tim Thompson, May 1994 - tjt@aloft.att.com

Both files use the General MIDI standard for patches and drums.
stkans1.mid uses pitch bending, which assumes that the bending
range is 2 semitones (which I believe General MIDI specifies).
stkans1.mid also includes reverb and chorus controller messages
that should be appropriate for Roland General MIDI synths
(I have an SC-7 - great little box).  I assume those messages
will be ignored by other General MIDI boxes.  stkans1.mid uses no drums.
In stkans2.mid, you can probably put any percussive sounds
on channels 1 and 2 and it'll sound okay.

These pieces were composed as part of the "Weinstock Variations" project
of the MMML (Mostly MIDI Mailing List).  The goal of the project was for
everyone to take the same single phrase and compose some music making
use of it (in any way, no rules).  The small phrase was created by
using the letters of the word "Weinstock" as pitches.

"Stock Answer #1"  - The original phrase was taken and interactively
	mutated in Keynote, generating the basic background pattern that
	extends throughout the piece.  The repetitions of this pattern
	were transposed by the pitches in the word "weinstock" (which
	produced a variety of interesting transitions).  I improvised
	all the melodic material, adding it piece by piece, usually one
	measure at a time.

"Stock Answer #2" - The original phrase was taken and algorithmically
	processed.  The basic technique used was to generate a lot of
	echoes and then arpeggiate the results.  Below is the Keynote code
	used.  This piece is the output of the finalwein() function,
	slightly (and manually) abbreviated by removal of some of the
	more repetitive measures.


	function finalwein() {
		x = echovariety(strnotes("weinstock"))
		w = polishit(x)
		return(p+w)
	}
	function echovariety(w) {
		w2 = addrootevery(w,2b)
		w3 = arpeggio(w2)
	
		w4 = echo(w3,2,4b)
		w4b = echo(w4,2,2b)
		w5 = echo(w4b,4,1b/8)
		w6 = echo(w5,4,1b/16)
	
		w7 = arpeggio(w6)
		w8 = transposeseqinplace(w7,w2)
		w9 = octavefence(w8,54,90)
		w10 = addrootevery(w9,4b)
		w11 = addrootevery(w10,2b)
		w12 = scatimes(w11,0.5)
		return(w12)
	}
	function polishit(w) {
		leng = latest(w)
		m = mono(w,2)	# random priority
		m2 = octavefence(m,74,100)
		m2.chan=2
		m2b = echo(m2{??.number%4==0},4,1b/4,0.80)
		m2c1 = cut(m2|m2b,CUT_TIME,leng/4,leng/3){rand(4)==0}
		m2c2 = cut(m2|m2b,CUT_TIME,leng/3,leng/2){rand(3)==0}
		m2c3 = cut(m2|m2b,CUT_TIME,leng/2,leng)
		m2c = m2c1 | m2c2 | m2c3
		# add some roots to melody toward end
		m2final = m2c | makerootevery(cut(m2c,CUT_TIME,2*leng/3),4b)
	
		# drums
		m3 = octavefence(m,54,64)
		m3.chan = 10
		m4 = m3{??.number%2==0}
		m5 = m3{??.number%3==0}
		m6 = m3{??.number%4==0}
		m7 = quantize(cut(m3{??.number%3==0},CUT_TIME,3*leng/4,leng),1b)
		m4.pitch = 61
		m5.pitch = 60
		m6.pitch = 64
		m7.pitch = 70
		m4 = quantize(m4,1b)
		m5b = echo(m5{??.number%9==0},4,1b/4,0.80)
		m6b = echo(m6{??.number%7==0},4,1b/4,0.80)
		m7b = echo(m7{??.number%3==0},4,1b/4,0.80)
		m7b1 = cut(m7b,CUT_TIME,0,7*leng/8)
		m7b2 = echo(cut(m7b,CUT_TIME,7*leng/8,leng),4,1b/4,0.95)
		m7b = m7b1 | m7b2
		drumsfinal = cut(m4|m5|m6|m7|m5b|m6b|m7b,CUT_TIME,leng/2,leng)
	
		nnotes = sizeof(w)
		www = echo(w%nnotes,16,1b/4,0.95)
		www2 = www
		www2.chan = 2
	
		return(m2final|drumsfinal|w|www|www2)
	}
